<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/fmt" prefix = "fmt"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>挂号列表</title>
<link type="text/css" rel="stylesheet"
	href="${ pageContext.request.contextPath }/assets/fontsawesome/css/font-awesome.css" />
<link type="text/css" rel="stylesheet"
	href="${ pageContext.request.contextPath }/assets/css/datepicker.css" />
<link type="text/css" rel="stylesheet"
	href="${ pageContext.request.contextPath }/assets/css/style.css" />

<script type="text/javascript"
	src="${ pageContext.request.contextPath }/assets/js/jquery-2.2.1.min.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		$(".jiao_hao").click(function(e) {
			var num = $( this ).children("input:last-child").prev().val(),
				/* name = $( this ).children("input:last-child").prev().val(), */
				keshi = $( this ).children( "input:last-child" ).val();
			 $.ajax({
				url:"${ pageContext.request.contextPath }/readString.do",
				dataType:"text",
				type:"get",
				data:{
					Text:"请"+num+"号到"+keshi+"就诊",
					Volume:100,
					Rate:2
				},
				success:function (argument) {
					
				},
				error:function (e) {
					console.log(e)
				}
			});  
		})
		$(".jiao_hao_ed").click(function() {
			console.log(123)
		})
	})
</script>
</head>
<body>
	<div class="main_box">
		<h2>
			<span></span>挂号列表
		</h2>
		<form
			action="${ pageContext.request.contextPath }/findAllPatientRegister.do"
			method="post" id="order_shform">
			<div class="search_box clearfix">
				<input type="text" class="f_left" name="medicalId"
					placeholder="输入就诊卡号" style="margin-right: 15px;" /> <label
					class="f_left">开始日期：</label>
				<div class="date_box">
					<input type="text" name=prTime id="start_date"  /> <i
						class="fa fa-calendar"></i>
				</div>
				<!-- <label class="f_left">结束日期：</label>
				<div class="date_box">
					<input type="text" name="end" id="end_date" readonly /> <i
						class="fa fa-calendar"></i>
				</div> -->
				<input type="submit" value="搜索" class="btn blue_btn search" /> <a
					href="front/xzguahao.jsp" class="btn btn_info">新增挂号</a>
			</div>
		</form>
		<div class="cont_box">
			<table border="0" cellspacing="0" cellpadding="0" class="table">
				<thead>
					<tr>
						<th>编号</th>
						<th>就诊卡号</th>
						<th>就诊科室</th>
						<th>就诊时间</th>
						<th>就诊医生</th>
						<th>挂号费</th>
						<th>支付方式</th>
						<th>是否就诊</th>
						<th width="200">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="patientRegister" items="${ patientRegisters }">
						<tr id="1">
							<!--此处id为进行编辑或删除时该条数据的唯一标识-->
							<td>${ patientRegister.prNumber }</td>
							<td>${ patientRegister.medicalId }</td>
							<td>${ patientRegister.prOffice }</td>
							<td> <fmt:formatDate value="${ patientRegister.prTime }" type='date' pattern='yyyy-MM-dd HH:mm:ss'/> </td>
							<td>${ patientRegister.prDoctor }</td>
							<td>${ patientRegister.prFare }</td>
							<td>${ patientRegister.prPayway }</td>
							<td>${ patientRegister.prIsResgister == 1?"已就诊":"未就诊" }</td>
							<td><c:if test="${ patientRegister.prIsResgister == 0 }">
									<a href="javascript:void(0);"
										class="table_btn table_info detail_btn jiao_hao">
										 <i
										class="fa fa-eye"></i> <span>叫号</span> 
										<input type="hidden" value="${ patientRegister.prNumber }">
<%-- 										<input type="hidden" value="${ patientRegister.prName }"> --%>
										<input type="hidden" value="${ patientRegister.prOffice }">
									</a>
								</c:if> <c:if test="${ patientRegister.prIsResgister == 1 }">
									<a href="javascript:void(0);"
										class="table_btn table_info detail_btn jiao_hao_ed"> <i
										class="fa fa-eye"></i> <span>叫号</span>
									</a>
								</c:if> <a
								href="${ pageContext.request.contextPath }/dialogue.do?prNumb=${ patientRegister.prNumber }"
								class="table_btn table_edit edit_btn"> <i class="fa fa-edit"></i>
									<span>就诊</span>
							</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>

</body>
</html>
